package day06;

import java.util.Arrays;

//数组的演示
public class ArrayDemo {
    public static void main(String[] args) {
        int[] b = {1,2,3,4,5,6,7};
        int[] a = Arrays.copyOf(b,b.length);
       for(int i = 0;i<a.length;i++){
            System.out.println(a[i]);
        }




















/*        int[] a = new int[]{10,20,30,40,50,60,70,80,90};
        int[] b = new int[9];//0,0,0,0,0,0,0,0,0
        System.arraycopy(a,2,b,0,2);
        //a:源数组
        //2:源数组的起始下标
        //b:目标数组
        //0:目标数组起始下标
        //2:要复制数组的元素个数
        for(int i = 0;i<b.length;i++){
            System.out.println(b[i]);
        }

 */
    }
}
